/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: COFFEEWEN
 * Date: 2022-08-26
 * Time: 16:28
 */
public class Test {
    public static int findContentChildren(int[] g, int[] s) {
        int sum = 0;
        int j = 0;
        for(int i = 0;i<g.length;i++){
            for (;j<s.length;j++){
                if (g[i] <= s[j]){
                    sum++;
                    break;
                }

            }
        }
        return sum;
    }
    public static int findComplement(int num) {
        int ans = 0;
        for(int i=0;num>0;i++){
            if((num&1)==0)
                ans+=1<<i;
            num>>=1;
        }
        return ans;
    }
    public static void main(String[] args) {

        int n = findComplement(1);
    }
}
